<template>
<R_regiser></R_regiser>
</template>

<script>

import R_regiser from "../components/regiser/R_regiser";
import axios from "axios";

export default {
  name: "regiser",
  components: {R_regiser},
  data(){
    return{
      user:{
        uname:"",
        upwd:""
      }
    }
  },
  methods:{
    register()
    {
      axios.post("http://localhost:8081/user/register", this.user).then(res => {
        console.log(res.data);
        if (res.data.state) {
          alert(res.data.msg + ",点击确定跳转至登录页面!");
          // location.href="/login.html";
        } else {
          alert(res.data.msg);
        }
      });
    }

  }
}
</script>

<style scoped>

</style>